package com.edu.eduservice.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.edu.commonutils.R;
import com.edu.eduservice.domain.CourseQuery;
import com.edu.eduservice.domain.EduCourse;
import com.edu.eduservice.domain.view.CourseInfoVo;
import com.edu.eduservice.domain.view.CoursePublishVo;
import com.edu.eduservice.domain.view.CourseQueryVo;
import com.edu.eduservice.domain.view.CourseWebVo;
import com.edu.servicebase.exceptionhandler.MyException;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 课程 服务类
 * </p>
 *
 * @author ljw
 * @since 2022-09-16
 */
public interface EduCourseService extends IService<EduCourse> {

    //添加基本课程信息
    R addCourse(CourseInfoVo courseInfoVo);

    R byid(String courseid);

    R updatecourse(CourseInfoVo courseInfoVo);

    CoursePublishVo getCoursePublishVoById(String id);

    void pageQuery(Page<EduCourse> pageParam, CourseQuery courseQuery);

    void delCourse(String id) throws MyException;

    List<EduCourse> selectbyTeacher(String id);

    Map<String, Object> pageListWeb(Page<EduCourse> pageParam, CourseQueryVo courseQuery);

    CourseWebVo selectbyidCourseInfo(String id);

    void updateByViewCount(String id);
}
